<!DOCTYPE html>
<html>
	
	<head>
		<meta charset="utf-8">

		<!-- !Always force latest IE rendering engine (even in intranet) & Chrome Frame
		Remove this if you use the .htaccess -->
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">


		<title>子窗口</title>
		<meta name="description" content="">
		<meta name="author" content="chenyong">

		<meta name="viewport" content="width=device-width; initial-scale=1.0">
 
		<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
		<link rel="shortcut icon" href="/favicon.ico">
		<link rel="apple-touch-icon" href="/apple-touch-icon.png">
		
		<style type="text/css">
			
			
			body{
				margin:50px;
			}
			
			div{
				font-size:12px;
			}
			
			div.box{
				margin-top:30px;
			}
		
			
		</style>
		
		<script type="text/javascript">
		
			function fn2(){
				window.opener.document.getElementById('comment').innerHTML=document.getElementById('txt').value;
				window.close();
			}
			
		</script>
	</head>
	
	<body>
		<h3>07_JavaScript_window_子窗口</h3>
			
		<p id="cldp"> </p>
		<p>输入你的祝福语:<input id="txt" type="text"/> </p>
		
		<button onclick="fn2();">点击返回内容到父页面</button>
	
	
	</body>
	
</html>
